local game = require "club.threecard.texas"

local M = game.ui.element()

M.store_watchers = {
    ingame = {
        ["$"] = function(self, store, state, args)
            self:hide()
        end,

        ["恢复游戏场景"] = function(self, store, state, args)
            if #state.scene.self_player.card_ids > 0 then
                self:hide()
            else
                self:show()
            end
        end,

        ["阶段变更"] = function(self, store, state, args)
            if state.phase_id <= store.state.phases.ready.id 
            or state.phase_id == store.state.phases.settle.id then
                self:hide()
            end            
        end
    }
}

function M:ctor()
    self.res = "club.threecard.texas/ui/ingame.b:resumer"
end

return M